
<?php
//MAIN FORM CLASS. ALWAYS BEING USED, INDIRECTLY.
/**
 * Registration Form
 * This form would allow users of the system register with the system
 *
 */

 class Student_Form_NewGrade extends Zend_Dojo_Form
 {

      protected $_name = "student_course";
	public function __construct($options = null)
		{
		parent::__construct($options);
		Zend_Dojo::enableForm($this);
		$this->setName('NewCourse');
		//$id = new Zend_Form_Element_Hidden('id');
                
              /*  $theID = $this->_getParam('id');
		//User enters his First Name
                $count=0;
                $number = new Student_Model_DbTable_Assessment();
                $number_of_boxes= $number->getAssessDetails($theID);

                foreach($number_of_boxes as $num){
                       $count = $num->num_of_assign;
                }
                echo $count;
               * 
               */

                $grade_weight = new Zend_Dojo_Form_Element_ValidationTextBox('max_grade_in_percent');
		$grade_weight->setLabel('What % is this assessment of the final grade?')
		->setRequired(true)
		->addFilter('StripTags')
		->addFilter('StringTrim')
                ->addFilter('StringToUpper')
		->addValidator('NotEmpty');

               

                $add_grade = new Zend_Dojo_Form_Element_ValidationTextBox('grade');
		$add_grade->setLabel('Enter grade:')
		->setRequired(true)
		->addFilter('StripTags')
		->addFilter('StringTrim')
                ->addFilter('StringToUpper')
		->addValidator('NotEmpty');
                
                
                $submit = new Zend_Dojo_Form_Element_SubmitButton('submit');

		$this->addElements(array($grade_weight, $add_grade));
                
	    $this->addElement($submit);
		//$this->setAction('register');
		$this->setMethod('POST');
		}
}



